// 无接口提交，用此模拟数据演示
import modelTreeData from './treeData'
function request(data) {
  return new Promise((resolve, reject) => {
    resolve(data)
  })
 }

// 获取模型树
export function getModelTree() {
  return request(modelTreeData)
}
// business/model/constructionArea/list?name=1&pageNum=1&pageSize=50&engineeringSectionId=1251117659748040704&modelManageId=1258446545221582848
// 获取模型树列表
export function getModelTreeList(query) {
  return request({
    url: `/business/model/constructionArea/list`,
    method: 'GET',
    params: query
  })
}
// 查询(登录人项目部i下的)项目数据
export function getProjectByOrgId() {
  return request({
    url: `/business/constProject/selectEsByContractOrgId`,
    method: 'get'
  })
}
// 获取模型列表
export function modelManageList(engineeringSectionId, hazardousSubEngineeringManagementId) {
  return request({
    url: `/business/model/modelManage/list`,
    method: 'get',
    params: {
      engineeringSectionId: engineeringSectionId,
      hazardousSubEngineeringManagementId: hazardousSubEngineeringManagementId,
      hazardous: hazardousSubEngineeringManagementId === undefined ? '0' : '1'
    }
  })
}
// 获取模型token
export function modelPreview() {
  return request({data: 'aaeabce26b584a92ab27808e0872f329'})
}
